package FanXing;

public class Test1 {
    public static void main(String[] args) {
        A<String> a1=new A<String>();
        a1.setKey("aa");
        String s=a1.getKey();
    }
}
//此处的泛型T一般用大写字母T意为type
class A<T>{
    private T key;
    public void setKey(T key){
        this.key=key;
    }
    public T getKey(){
        return this.key;
    }
}
